// To change this License template, choose Tools / Templates
// and edit Licenses / FanDefaultLicense.txt
//
// History:
//   07.09.2010 JSTAUDEMEYER Creation
//

**
** NoteTest
**
class NoteTest : TestBase
{

  Void test0() {
      n := Note(0)
      s := n.toStr
      echo(s)
  }

  Void test1()
  {
    m := Music.make {
      n1 := Note(12,1f/2)
      verif("C(1)*0.5",n1)
      n2 := Note.makeCopyOf(n1)
      verif("C(1)*0.5",n2)
      n3 := Note.makeCopyOf(n2){it.pitch=-12}
      verif("C(-1)*0.5",n3)
      n4 := n3.copy{it.length=n3.length*2}
      verif("C(-1)",n4)
      //n5 := Note()[1]
      //echo(n5)
      list1 := n2+n3
      verif("(C(1)*0.5+C(-1)*0.5)",list1)
      verif("(C+D)",c+d)
      verif("C(2)",c(+2))
      verif("(C*2.0+C*0.5)",c*2+c/2)
      verif("(D(1)*2.0+D*0.5)",d(1)/.5+d(-1)*.5)
      verif("Fs",f.s)
      verif("F",e.s)
      verif("B",c.f)
      verif("B",b)
    }
  }
  
  Void testRest() {
    m := Music.make {
      verif("R",r)
      verif("R*0.5",r/2)
      verif("R*2.0",r*2)
    }
  }

  Void testAccord() {
    m := Music {
      n2 := c%e%g%b
      verif("C%E%G%B", n2)
      n2 = g%c //%b%c%e/2
      verif("G%C", n2)
    }
  }


}

